package com.voole.adapters;

import java.util.ArrayList;
import java.util.List;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.astuetz.viewpager.extensions.sample.CardFragment1;
import com.astuetz.viewpager.extensions.sample.CardFragment2;
import com.astuetz.viewpager.extensions.sample.CardFragment3;
import com.voole.fragments.LocalAppFragment;

/**
 * @author hljdrl@gmail.com
 *
 */
public class HomeFragmentAdapter extends FragmentPagerAdapter {

	private final String[] TITLES = { "Ft-1", "Ft-2", "Ft-3","Ft-4","Ft-5","Ft-6","Ft-7"};
	private List<Fragment>  mFragments = new ArrayList<Fragment>();
	public HomeFragmentAdapter(FragmentManager fm) {
		super(fm);
//		mFragments.add(new CardFragment2());
		mFragments.add(new CardFragment1());
		mFragments.add(new CardFragment3());
		mFragments.add(new LocalAppFragment());
		
	}

	@Override
	public CharSequence getPageTitle(int position) {
		return TITLES[position];
	}

	@Override
	public int getCount() {
		return mFragments.size();
	}

	@Override
	public Fragment getItem(int position) {
		return mFragments.get(position);
	}

}
